
const Questionaire = require('../models/index').getModel('questionaire');

const questionaire = {
    // 保存答卷
    async saveQuestionaire(qn) {
      const option = {upsert: true, new: true, setDefaultsOnInsert: true}
      const result = await Questionaire.findOneAndUpdate({qId: qn.qId}, qn, option)
      return result
  },
}

module.exports = questionaire